﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Index.Master" AutoEventWireup="true" CodeBehind="adLoaiDV.aspx.cs" Inherits="EC_Agent.LoaiDV" %>
<asp:Content ID="Title" ContentPlaceHolderID="Title" runat="server">
Quản lý Loại Dịch vụ
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="Maincontent" runat="server">
    <asp:GridView ID="gvAGENT" runat="server" AutoGenerateColumns="False" CssClass="grid"
            AlternatingRowStyle-CssClass="gridAltRow" RowStyle-CssClass="gridRow" ShowFooter="True"
            EditRowStyle-CssClass="gridEditRow" FooterStyle-CssClass="gridFooterRow" OnRowCancelingEdit="gvAGENT_RowCancelingEdit"
            OnRowCommand="gvAGENT_RowCommand" OnRowDeleting="gvAGENT_RowDeleting"
            OnRowEditing="gvAGENT_RowEditing" OnRowUpdating="gvAGENT_RowUpdating" DataKeyNames="MaLoaiDV">

            <Columns>

                <asp:TemplateField HeaderText="Tên loại Dịch vụ" HeaderStyle-HorizontalAlign="Left"
                    ControlStyle-Width="90px">
                    <EditItemTemplate>
                        <asp:TextBox ID="txtTenLoaiDV" runat="server" Text='<%# Bind("TenLoaiDV") %>' Width="90px"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="rfvTenLoaiDV" ValidationGroup="Update" runat="server"
                            ControlToValidate="txtTenLoaiDV" ErrorMessage="Please Enter Name" ToolTip="Please Enter Name"
                            SetFocusOnError="true" ForeColor="Red">*</asp:RequiredFieldValidator>
                    </EditItemTemplate>
                    <FooterTemplate>
                        <asp:TextBox ID="txtTenLoaiDV" runat="server" Width="90px"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="rfvTenLoaiDV" ValidationGroup="Insert" runat="server"
                            ControlToValidate="txtTenLoaiDV" ErrorMessage="Please Enter Name" ToolTip="Please Enter Name"
                            SetFocusOnError="true" ForeColor="Red">*</asp:RequiredFieldValidator>
                    </FooterTemplate>
                    <ItemTemplate>
                        <%# Eval("TenLoaiDV") %>
                    </ItemTemplate>
                </asp:TemplateField>

                <asp:TemplateField HeaderText="Edit" ShowHeader="False" HeaderStyle-HorizontalAlign="Left">
                    <EditItemTemplate>
                        <asp:LinkButton ID="lnkUpdate" runat="server" CausesValidation="True" CommandName="Update"
                            Text="Update" OnClientClick="return confirm('Update?')" ValidationGroup="Update"></asp:LinkButton>
                        <asp:ValidationSummary ID="vsUpdate" runat="server" ShowMessageBox="true" ShowSummary="false"
                            ValidationGroup="Update" Enabled="true" HeaderText="Validation Summary..." />
                        <asp:LinkButton ID="lnkCancel" runat="server" CausesValidation="False" CommandName="Cancel"
                            Text="Cancel"></asp:LinkButton>
                    </EditItemTemplate>
                    <FooterTemplate>
                        <asp:LinkButton ID="lnkAdd" runat="server" CausesValidation="True" CommandName="Insert"
                            ValidationGroup="Insert" Text="Insert"></asp:LinkButton>
                        <asp:ValidationSummary ID="vsInsert" runat="server" ShowMessageBox="true" ShowSummary="false"
                            ValidationGroup="Insert" Enabled="true" HeaderText="Validation..." />
                    </FooterTemplate>
                    <ItemTemplate>
                        <asp:LinkButton ID="lnkEdit" runat="server" CausesValidation="False" CommandName="Edit"
                            Text="Edit"></asp:LinkButton>
                    </ItemTemplate>
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Delete" ShowHeader="False" HeaderStyle-HorizontalAlign="Left">
                    <ItemTemplate>
                        <asp:LinkButton ID="lnkDelete" runat="server" CausesValidation="False" CommandName="Delete"
                            Text="Delete" OnClientClick="return confirm('Delete?')"></asp:LinkButton>
                    </ItemTemplate>
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:TemplateField>

            </Columns>

            <EmptyDataTemplate>
                <table class="grid" cellspacing="0" rules="all" border="1" id="gvAGENT" style="border-collapse: collapse;">
                    <tr>
                        <th align="left" scope="col">
                            Name
                        </th>
                        <th align="left" scope="col">
                            Edit
                        </th>
                        <th scope="col">
                            Delete
                        </th>
                    </tr>

                    <tr class="gridRow">
                        <td colspan="8">
                            No Records found...
                        </td>
                    </tr>
                    <tr class="gridFooterRow">
                        <td>
                            <asp:TextBox ID="txtTenLoaiDV" runat="server"></asp:TextBox>
                        </td>
                        <td colspan="2" align="justify" valign="middle">
                            <asp:LinkButton ID="lnkAdd" runat="server" CausesValidation="false" CommandName="emptyInsert"
                                Text="emptyInsert"></asp:LinkButton>
                        </td>
                    </tr>
                </table>
            </EmptyDataTemplate>
        </asp:GridView>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="sidecontent" runat="server">
    <p class="title_general">
        <b>Menu quản lý</b></p>
    <ul>
        <li class="city_item"><a href="adAdmin.aspx">Quản lý</a></li>
        <li class="city_item"><a href="adNhaCungCap.aspx">Quản lý Nhà cung cấp dịch vụ</a></li>
        <li class="city_item"><a href="adHoaDonGiaoDich.aspx">Quản lý Hóa đơn mua dịch vụ</a></li>
        <li class="city_item"><a href="adGiaBan.aspx">Quản lý Giá bán dịch vụ</a></li>
        <li class="city_item"><a href="adHoaDonNCC.aspx">Quản lý Hóa đơn thanh toán</a></li>
        <li class="city_item"><a href="adThanhToan.aspx">Thanh toán</a></li>
        <li class="city_item"><a href="adKhachHang.aspx">Quản lý Khách hàng</a></li>
        <li class="city_item select">Quản lý Loại Dịch vụ</li>
        <li class="city_item"><a href="adNhanVien.aspx">Quản lý Nhân viên</a></li>
        <li class="city_item"><a href="adChangePass.aspx">Thay đổi mật khẩu</a></li>
        <li class="city_item"><a href="">Đăng xuất</a></li>
    </ul>
</asp:Content>
